package optimizers.commons;

import model.Constants;

public class GAConstants {

	public final static boolean COMPLEX_FITNESS = false;
	
	public static final boolean reinitialPopulation = false;
	public static final int numberOfGenerations = 200;
	public static final int populationSize = 100;
	public static final int noOfSimpleSeq = 4;
	public static final int nMathLink = 2;

	public static double intermediaryscore = 0.1;
	//public static int maxExecutionInSeconds = 30;
	public static double pruningThreshold = 0.95; //in percentage
	
	public static double inputAmmount = 200;
	public static int[] inputTime = new int[] { 15000, 30000 };

	public static int minTimeStable = 500;
	public static double changeThresholdStable = 5E-3;
	public static double changeStateThreshold = 10;
	public static int timeToCheckStability = 50;
	public static int maxIntegrationSteps = 1000000;

	public static int maxExecutionInSeconds = 300;

	public static int maxTime = 1500;
	
	public static final double gSeqInitConcentration = 10;
	public static final double gSeqInitConcentration_low = .010;
	// public static final double[] gActTemplateInitConcentration =
	// {3.0E1,5.0,5.0,3.0E1,5.0};
	public static final double gActTemplateInitConcentrationLibMin = 1;
	public static final double gActTemplateInitConcentrationLibMax = 60;
	// public static final double gInhTemplateInitConcentration = 3.0E1;
	public static final double gInhTemplateInitConcentrationLibMin = 1;
	public static final double gInhTemplateInitConcentrationLibMax = 60;
	public static final double[] gExoLib = { 0.10, 0.15, 0.20, 0.25, 0.30,
			0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.80, 0.90, 1.0 };
	
	// Range of Reaction Parameers (For Optimization by DE only)
	public static final double gSeqInitConMin = 0.0; // 1.0E-9;
	public static final double gSeqInitConMax = 1.0E2; // can use just {1.0e-9,
	// 2.0E-9, 0.0} these
	// discrete values
	// instead of range
	public static final double gInhSeqInitConMin = 0.0; // 1.0E-9;
	public static final double gInhSeqInitConMax = 1.0E2; // can use just
	// {1.0e-9, 2.0E-9,
	// 0.0} these
	// discrete values
	// instead of range


	public static final double gTemplateInitConMin = 1.0;
	public static final double gTemplateInitConMax = 2.0E2; // this range could
	// be discretized
	public static final double gExoMin = 0.1;
	public static final double gExoMax = 1.0; // this range could be discretized

	// Fitness implementation
	// initial time skip in BarryDrennan's fitness implementation
	// public static final int gMaxEvaluationTime = 12000;
	public static final int gTimeSkip = 000; // 2000;

	// GA (for structure identification) Parameters
	public static final double ActivationProbability = 0.2;
	public static final double InhibitionProbability = 0.5;
	public static final double InhibitionSequenceProbability = 0.5;

	public static final int gGACrossoverPoints = 3;
	public static final double gGACrossoverProbability = 0.7;
	public static final double gGAMutationProbability = 0.2; // 1.0/gGeneNo;
	public static final boolean gSharing = false;
	public static final double gSigmaShare = 3.0;
	public static final int gTournamentSize = 5;
	public static final boolean gEliteStrategy = true;
	public static final int gElitePopSize = 4;
	public static final int gSelectionMethod = 2; // {1,2}: 1= Roulette
	// Selection, 2= Tournament
	// Selection

	// DE Parameters

	public static final int gDEMaxGen = 10;
	public static final int gDEPopSize = 20;
	public static final double gCrossRate = 0.9;
	public static final double gAmpFact = 0.8;

	// GA (for parameter optimization - GAforOligatorOpt) Parameters

	public static final int gGAOptMaxGen = 20;
	public static final int gGAOptPopSize = 30;

	// ********************************************************************************
	// Parameters for running the system

	public static final int gSystemToEvolve = 1; // {0: oligator, 1: bistablity}
	public static final String gTargetSystemName = "Bistability";
	public static final int gOligoModelToUse = 1; // {0: OligoSystemSimple, 1:
	// OligoSystemComplex}

	public static final int gNumberOfRandomParameterSet = 100; // number of
	// random
	// parameter
	// sets to be
	// used for
	// evaluating
	// bi-stability
	// /
	// multi-stability
	public static final int windowSize = 50;

}
